/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.machineryrental.dto;

import java.util.Date;

/**
 * Data transfer object for entity Rental.
 * 
 * @author Jozef Triscik
 */
public class RentalDTO {
    
    /**
     * Unique id.
     */
    private long id = 0;
    
    /**
     * Customer, which has created rental for machine.
     */
    private CustomerDTO customer;
    
    /**
     * Machine, which is rented.
     */
    private MachineDTO machine;
    
    /*
     * Date of rent of machine.
     */
    private Date dateOfRent;
    
    /**
     * Date, until to which the machine should be returned.
     */
    private Date dateOfReturn;
    
    /**
     * Real count of days, on which was machine rented.
     */
    private int duration;

    /**
     * Return identifier of rental
     * @return Identifier of rental
     */
    public long getId() {
        return id;
    }

    /**
     * Sets given id.
     * @param id Id of rental
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * Returns customer, which has rented machine.
     * @return Customer, to which we rented machine.
     */
    public CustomerDTO getCustomer() {
        return customer;
    }

    /**
     * Sets customer, who rented machine.
     * 
     * @param customer Customer, who rented machine.
     */
    public void setCustomer(CustomerDTO customer) {
        this.customer = customer;
    }

    /**
     * Returns rented machine.
     * @return Rented machine
     */
    public MachineDTO getMachine() {
        return machine;
    }

    /**
     * Set rented machine
     * @param machine rented machine
     */
    public void setMachine(MachineDTO machine) {
        this.machine = machine;
    }

    /**
     * Returns real date, when was machine rented.
     * @return Date of rent of machine
     */
    public Date getDateOfRent() {
        return dateOfRent;
    }

    /**
     * Sets date, when was machine rented.
     * 
     * @param dateOfRent Date of rent of machine.
     */
    public void setDateOfRent(Date dateOfRent) {
        this.dateOfRent = dateOfRent;
    }

    /**
     * Returns date, wchich shoul be rented machine returned.
     * @return Date, when machine should be returned.
     */
    public Date getDateOfReturn() {
        return dateOfReturn;
    }

    /**
     * Sets date, when rented machine should be returned.
     * @param dateOfReturn 
     */
    public void setDateOfReturn(Date dateOfReturn) {
        this.dateOfReturn = dateOfReturn;
    }

    /**
     * Gets real duration of rent.
     * @return Real count of days, when was machine rented.
     */
    public int getDuration() {
        return duration;
    }

    /**
     * Sets real count of days, when was machine rented.
     * @param duration Count of days, when was machine rented.
     */
    public void setDuration(int duration) {
        this.duration = duration;
    }
    
    
}
